﻿#region Opis pliku
//-----------------------------------------------------------------------------
// MenuParticle.cs
// Autor: Jan Czarnowski
// 12.11.2012
//-----------------------------------------------------------------------------
#endregion

#region Using...

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using System.Collections.Generic;
using System;

#endregion

namespace pogra
{
    /// <summary>
    /// Klasa cząsteczki efektów wybuchu w głównym menu. W obecnej wersji nieużywana
    /// </summary>
    class MenuParticle : Particle
    {
        float gravity = 10.0f;
        float gravitationVel = 0.0f;
        SpriteFont font;
        string text;

        public MenuParticle(Texture2D particleBase, Vector2 Position, float Velocity, float rotation, TimeSpan life, SpriteFont font, string text)
            : base(particleBase, Position, Velocity, rotation, life)
        {
            this.font = font;
            this.text = text;
        }

        protected override void Move(TimeSpan deltat)
        {
            base.Move(deltat);

            gravitationVel += (float)(gravity * deltat.TotalMilliseconds / 1000);
            this.Position.Y += (float)(gravitationVel * deltat.TotalMilliseconds / 1000);
        }

        public override void Draw(ExtendedSpriteBatch exSpriteBatch)
        {
            exSpriteBatch.DrawString(font, text, this.Position, new Color(0, 255, 0));
        }
    }
}
